import net.egork.utils.Solver;
import net.egork.utils.io.InputReader;

import java.io.PrintWriter;

public class INTEST implements Solver {
	public void solve(int testNumber, InputReader in, PrintWriter out) {

        int n = in.readInt();
        int k = in.readInt();

        int ans = 0;
        for (int i = 0; i < n; ++i)
            if (in.readInt() % k == 0)
                ++ans;
        out.println(ans);
	}
}

